package phapp.dao.barapp;

import java.util.List;

import javacommon.base.*;
import cn.org.rapid_framework.page.*;
import org.springframework.stereotype.Component;

import phapp.model.barapp.*;

/**
  * <p> 标题: 会员附件表 ,tc_vip_annex_info 数据处理层
  * <p>Description : 执行./mapper/的VipAnnexMapper.xml的相应SQL语句
  * <p>Copyright: Copyright (c) 2014-10
  * <p>Company:
  * @see phapp.model.barapp.VipAnnex
  * @author you name
  * @version 1.0
*/

@Component
public class VipAnnexDao extends BaseIbatis3Dao<VipAnnex,java.lang.Integer>{

   public Class getEntityClass() {
      return VipAnnex.class;
   }
   /**
   * <p> 标题:修改和新增<br>
   * <p>Description :
   * @param VipAnnex u 
   * @author
   */
   public void saveOrUpdate(VipAnnex entity) {
      if(entity.getId() == null)
         save(entity);
      else
         update(entity);
   }

   /**
   * <p> 标题:批量删除<br>
   * <p>Description :
   * @param VipAnnex u
   * @return int
   * @author
   */
   public int removeByIdArry(VipAnnex u) {
      int i=-1;
      i =delete("VipAnnex.removeByIdArry", u);
      return i;
   }
   /**
   * <p> 标题:分页查询<br>
   * <p>Description :
   * @param PageRequest pageRequest
   * @return Page
   * @author
   */
   public Page findByPageRequest(PageRequest pageRequest) {
      return pageQuery("VipAnnex.pageSelect",pageRequest);
   }


   /**
   * <p> 标题:按Bean查询返回List<br> 
   * @param VipAnnex bean
   * @return List
   * @author
   */
   public java.util.List findListByBean(VipAnnex bean){
	   return  getSqlSessionTemplate().selectList("VipAnnex.findListByBean",bean);
   }
   /**
	* <p>通过 Map 修改一条 数据<br> 
	* @param  java.util.Map 
   */
   public int updateByMap(java.util.Map map){
  		int count = getSqlSessionTemplate().update("VipAnnex.update",map);
  		return count;
  }

}
